package com.tensquare.friend.service;

import com.tensquare.friend.dao.NoFriendDao;
import com.tensquare.friend.pojo.NoFriend;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class NoFriendService {

    @Autowired
    private NoFriendDao noFriendDao;

    //1.添加不喜欢的推荐好友
    public void addNoFriend(String userId,String friendId){
        //1.创建非好友对象
        NoFriend noFriend = new NoFriend();
        noFriend.setFriendid(friendId);
        noFriend.setUserid(userId);
        //2.提交
        noFriendDao.save(noFriend);
    };
}
